package Reseau;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class FluxdeString {

	public static String envoi(Socket socket,String message) throws IOException{
		PrintWriter out = new PrintWriter(socket.getOutputStream());
        out.println(message);
        out.flush();
        
		return message;
	}
	
	public static String reception(Socket socket) throws IOException{
		BufferedReader in = new BufferedReader (new InputStreamReader (socket.getInputStream()));
	        String message_distant = in.readLine();
			return message_distant;
	}
}
